"
" Macro1 Macro
" Macro recorded 6/29/2011 by cathy
"
" delete unwanted columns from file
" what i really should be doing is working from a list of wanted columns
" probably kept in an array here or in the personal.xls workbook
" TODO:  make list, iterate row1 cells checking against list, delete unwanted columns
" best to work from the far right and work our way left
	dim GoodColumns( 0 to 20 ) as String
	

    ChDir "E:\Quickbooks Data\LoadsAndReceiptsDatabase"
    Workbooks.Open Filename:= _
        "E:\Quickbooks Data\loadsAndReceiptsDatabase\download.htm"
    Columns("T:W").Select
    Selection.Delete Shift:=xlToLeft
    Columns("B:B").Select
    Selection.Delete Shift:=xlToLeft
    ActiveWorkbook.Save
    ActiveWindow.Close
End Sub
Sub waitabit()
	Dim intWait As Integer
    " Slow the processing down a bit before trying again
	For intWait = 1 To 100
        DoEvents
    Next
End Sub
Sub macro2()
    ActiveWindow.LargeScroll ToRight:=2
    ActiveWindow.ScrollColumn = 21
    ActiveWindow.ScrollColumn = 20
    ActiveWindow.ScrollColumn = 19
    ActiveWindow.ScrollColumn = 18
    ActiveWindow.ScrollColumn = 17
    ActiveWindow.ScrollColumn = 16
    ActiveWindow.ScrollColumn = 15
    ActiveWindow.ScrollColumn = 14
    ActiveWindow.SmallScroll ToRight:=1

End Sub
dim WantedColumns() as string = split("Load #", "Work Order #", "Office", "Status", "Inv. #", "Inv. Date", "Dispatcher", "Sales Rep", "Ship Date", "Del Date", "Customer", "Shipper 1", "Shipper 1 City", "Shipper 1 St.", "Shipper 1 P.O. #", "Shipper 2", "Shipper 2 City", "Shipper 2 St.", "Shipper 2 P.O. #", "Consignee 1", "Consignee 1 City", "Consignee 1 St.", "Consignee 2", "Consignee 2 City", "Consignee 2 St.", "Consignee 3", "Consignee 3 City", "Consignee 3 St.", "Consignee 4", "Consignee 4 City", "Consignee 4 St.", "Consignee 5", "Consignee 5 City", "Consignee 5 St.", "Consignee 6", "Consignee 6 City", "Consignee 6 St.", "Consignee 7", "Consignee 7 City", "Consignee 7 St.", "Consignee 8", "Consignee 8 City", "Consignee 8 St.", "Truck", "Trailer", "Billing", "Carrier/Driver", "Carrier City", "Carrier St.", "Paid", "Driver Pay", "Net Profit")
